﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="wfRankTrab.aspx.cs" Inherits="Consultas_wfRankTrab" %>
<%@ Register Src="../wuc/wuc_Header.ascx" TagName="wuc_Header" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Ranking de Trabajos</title>
        <link rel="stylesheet" href="../styles/a-main/a-main.css" type="text/css" />
    <script language="javascript" src="../include/popcalendar.js"></script> 
    <script language="javascript" src="../include/DD_roundies_0.0.1a.js"></script>
    <script language="javascript" src="../include/fecha.js"></script>
    
    <script language="javascript">
    function ExportToExcel(nombreArea) {    
        var HTMLContenido = document.getElementById(nombreArea).outerHTML;        
        ventana = window.open('',"ventana","width=700,height=600,top=0,left=3000");
        ventana.document.open();
        ventana.document.write('<html><head></head><body>');
        ventana.document.write(HTMLContenido);
        ventana.document.write('Hola Mundo</body></html>');
        alert(HTMLContenido);    
        //ventana.document.close();        
    }
//<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="application/vnd.ms-excel"> 


    //DD_roundies.addRule('#divCriterios', 10);
    </script>
    

</head>
<body>
    <form id="form1" runat="server">
    <uc1:wuc_Header ID="Wuc_Header1" runat="server" />
        &nbsp;
    <div id="content">
    <table width="100%" border="0" cellpadding="7" cellspacing="0">
  <tr>
      <td align="left" colspan="1" rowspan="3" valign="top">
      <table width="100%" cellspacing="2" cellpadding="0">
                                            <tr>
                                                <td class="CptWFMain">
                                                    Accesos Directos</td>
                                            </tr>
                                            <tr>
                                                <td class="Menu">
                                                <ul class="MenAccDirec">
                                <li><a href="../general/wfindex.aspx">Menu Principal</a></li>
                                <li><a href="../trabajo/wfPrgTrab.aspx">Programación de Trabajos</a></li>
                                <li><a href="../negociacion/wfNegociacion.aspx">Negociación</a></li>
                                <li><a href="../trabajo/wfRegInfTrab.aspx">Registro de Trabajos</a></li>
                                <li><a href="../Consultas/wfIndexConsultas.aspx">Consultas</a></li>
                                <li><a href="../Reportes/wfIndexRep.aspx">Reportes</a></li>
                                </ul>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 3px">
                                                </td>
                                            </tr>
                                        </table>
      </td>
    <td colspan="5" align="left">
    <div id="divCriterios" class="DivRound">
    <table width="100%">
    <tr>
    <td style="height: 26px">
        <strong><span style="font-size: 9pt; color: #10459c; font-family: Arial">Fecha de Inicio:</span></strong></td>
    <td style="height: 26px"><asp:TextBox ID="txtFecIni" contentEditable="false" onblur="valFecha(this)" runat="server" CssClass="inTextData" MaxLength="10" Width="75px"></asp:TextBox>
    <img src="../styles/cssmain/calendar.gif" border="0" onclick="popUpCalendar(this, txtFecIni, 'dd/mm/yyyy')" id="imgFecIni" />
        <asp:RequiredFieldValidator ID="rfvFecIni" runat="server" ControlToValidate="txtFecIni"
            ErrorMessage="La Fecha de Inicio es requerida" ValidationGroup="i">*</asp:RequiredFieldValidator></td>
    <td style="height: 26px">
        <span style="font-size: 9pt; color: #10459c; font-family: Arial"><strong>
        Fecha de Fin</strong><span
            style="font-size: 12pt; color: #000000; font-family: Times New Roman">:</span></span></td>
    <td style="height: 26px; font-size: 12pt; color: #000000; font-family: Times New Roman;"><asp:TextBox ID="txtFecFin" onblur="valFecha(this)" contentEditable="false" runat="server" CssClass="inTextData" MaxLength="10" Width="75px"></asp:TextBox>
    <img src="../styles/cssmain/calendar.gif" border="0" onclick="popUpCalendar(this, txtFecFin, 'dd/mm/yyyy')" id="imgFecFin" />
        <asp:RequiredFieldValidator ID="rfvFecFin" runat="server" ControlToValidate="txtFecFin"
            ErrorMessage="La Fecha de Fin es requerida" ValidationGroup="i">*</asp:RequiredFieldValidator></td>
    <td style="height: 26px; font-size: 12pt; color: #000000; font-family: Times New Roman;">&nbsp;</td>
    <td style="height: 26px; font-size: 12pt; color: #000000; font-family: Times New Roman;">
        </td>
    </tr>
    <tr style="font-size: 12pt; color: #000000; font-family: Times New Roman">
    <td>
        <strong><span style="font-size: 9pt; color: #10459c; font-family: Arial">Avión:</span></strong></td>
    <td><asp:TextBox ID="txtMatAvi" runat="server" CssClass="inTextData" MaxLength="5" Width="75px"></asp:TextBox></td>
    <td>
        <strong><span style="font-size: 9pt; color: #10459c; font-family: Arial">Origen:</span></strong></td>
    <td><asp:DropDownList ID="ddl_Origen" runat="server" CssClass="sel">
        </asp:DropDownList></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;
        <asp:ImageButton ID="imgConsultar" runat="server" ImageUrl="../styles/a-main/BTbuscar.gif"
            OnClick="imgConsultar_Click" /></td>
    <td>&nbsp;</td>
    <td></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    </table>
    </div>
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="i" />
        <asp:Label ID="lblMensaje" runat="server" CssClass="lblMensaje"></asp:Label></td>
    </tr>
        <tr>
            <td align="right" colspan="5">
                &nbsp;<asp:ImageButton ID="btnToExcel" runat="server" ImageUrl="../styles/a-main/Excel.jpg"
            OnClick="btnToExcel_Click" /></td>
        </tr>
        <tr>
            <td align="center" colspan="5">
            
            <div id="Imprimir">
        <asp:GridView ID="gvResult" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Vertical" AllowPaging="True" OnPageIndexChanging="gvResult_PageIndexChanging">
            <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
            <Columns>
                <asp:BoundField DataField="DescGeneralTrabajo" HeaderText="Descripcion del Trabajo" >
                    <ItemStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="CodOrigen" HeaderText="Origen" />
                <asp:BoundField HeaderText="ATA" DataField="CodAta"  />
                <asp:BoundField HeaderText="SubATA" DataField="Cod_SAta"  />
                <asp:BoundField DataField="CodComp" HeaderText="Componente" />
                <asp:BoundField DataField="StrHHProm" HeaderText="Tiempo Medio (hrs)" >
                    <ItemStyle HorizontalAlign="Right" />
                </asp:BoundField>
                <asp:BoundField DataField="HHMin" HeaderText="Tiempo M&#237;nimo" >
                    <ItemStyle HorizontalAlign="Right" />
                </asp:BoundField>
                <asp:BoundField DataField="HHMax" HeaderText="Tiempo M&#225;ximo" >
                    <ItemStyle HorizontalAlign="Right" />
                </asp:BoundField>
                <asp:BoundField DataField="HHEstim" HeaderText="Tiempo Estimado" >
                    <ItemStyle HorizontalAlign="Right" />
                </asp:BoundField>
                <asp:BoundField DataField="StrVariacionPorcent" HeaderText="% Variacion" >
                    <ItemStyle HorizontalAlign="Right" />
                </asp:BoundField>
            </Columns>
            <RowStyle BackColor="#EEEEEE" ForeColor="Black" CssClass="RowGrid" />
            <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" CssClass="GVPage" />
            <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="Gainsboro" />
        </asp:GridView>
        </div>
            </td>
        </tr>
    </table>
    
    <div id="resultado"></div>
    <br />
        <br />
    </div>
    </form>    
</body>
</html>
